package cn.edu.scau.sec.caixiaoqing.spring.utils;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 饿汉式单例模式
 */
public class BeanSingletonUtils {

    private static ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");

    public static ApplicationContext getInstance(){
        return applicationContext;
    }

    private BeanSingletonUtils(){}
}
